Skip to main content
This forum is closed to new posts and responses. The content has been migrated to the Digital Solutions Community. Please join us there for new content as well as this content. For customer support, please visit the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next
Subject: URGENT : How to extract file attachments that are not a part of the "Body" from notes messages ?
Feedback Type: Question
Product Area: Domino Designer on Eclipse (DDE)
Technical Area: Customization
Platform: Windows XP client
Release: 8.5
Reproducible: Not applicable

we have a requirement to extract all the file attachments from notes messages in JAVA. We cannot use lotus scripts!

I am using the Notes getEmbeddedObjects() of RichTextItem to get all the attachments that are present in the "Body" of the message :

below is the code -

RichTextItem body = (RichTextItem)doc.getFirstItem("Body");
Vector v = body.getEmbeddedObjects();
Enumeration e = v.elements();
while (e!=null && e.hasMoreElements()) {

EmbeddedObject eo = (EmbeddedObject)e.nextElement();
//check if the object is a file attachment

String type = getObjectType(eo);
if (type.equals("file attachment")){

eo.extractFile("C:\\extracts\\"+eo.getSource());

}

}


This approach fails when we have a message with just attachments and No Body (RichTextItem cannot be used as the attachment is not a part of the "Body" ).

Please let me know if you are aware of an alternate solution to extract attachments that are NOT a part of the Body or to extract attachments from messages that do not have a body.

Thanks !


Feedback number WEBB7PJN64 created by ~Tony Frogeroskiader on 02/23/2009

Status: Open
Comments:

URGENT : How to extract file attach... (~Tony Frogerosk... 23.Feb.09)
. . notesdocument.embeddedobjects (~Vanessa Kiwete... 23.Feb.09)
. . . . alternately... (~Laura Deskiski... 24.Feb.09)
. . . . . . resolved the issue (~Tony Frogerosk... 2.Mar.09)
. . . . . . . . URGENT (~Alexis Ekvelug... 22.Jul.14)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS